export default {
    mode: 'spa', //universal
    /*
     ** Headers of the page
     */
    head: {
        title: '智慧水务营销收费系统',
        meta: [
            { charset: 'utf-8' },
            { name: 'viewport', content: 'width=device-width, initial-scale=1' },
            { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
        ],
        link: [
            { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
        ],
        script: [
            { src: '/js/jquery.min.js' },
            { src: '/js/vector.js' },
            { src: '/js/time.js' },
            { src: '/js/md5.js' },
            { src: '/js/LodopFuncs.js' }
        ]
    },
    /*
     ** Customize the progress-bar color
     */
    loading: false,//{ color: '#409EFF' },
    /*
     ** Global CSS
     */
    css: [
        'element-ui/lib/theme-chalk/index.css',
        '~/assets/style/common.css',
        '~/assets/style/style.scss',
        '~/assets/style/other.scss',
        '~/static/iconfont/iconfont.css',
    ],
    /*
     ** Plugins to load before mounting the App
     */
    plugins: [
        '@/plugins/element-ui',
        '@/plugins/axios',
        '@/plugins/vue-echarts',
        '@/plugins/print',
        '@/plugins/resetMessage',
    ],
    /*
     ** Nuxt.js dev-modules
     */
    buildModules: [],
    /*
     ** Nuxt.js modules
     */
    modules: [
        '@nuxtjs/axios'
    ],
    axios: {
        proxy: true,
        prefix: '/', // baseURL
        credentials: true,
    },
    proxy: {
        '/service': {
            target: 'http://sfs.sanfanc.com', // 代理地址
            changeOrigin: true,
            pathRewrite: {
                '^/service': '/zzbs/sxtyyqbs', //将 /api 替换掉    bs = billing system
            },
        },
        '/test': {
            target: 'http://192.168.10.174:8000', // test
            changeOrigin: true,
            pathRewrite: {
                '^/test': '/',
            },
        },
    },
    /*
     ** Build configuration
     */
    build: {
        transpile: [/^element-ui/],
        /*
         ** You can extend webpack config here
         */
        extend(config, ctx) {},
        transpile: ['vue-echarts', 'resize-detector']
    },
    server: {
        port: 80,
        host: '0.0.0.0'
    }
}